Rulebase Configuration File

Rulebase configuration file  

The Oracle Determinations Engine provides the capability to load the Custom Function Handler, Inferencing Listener and Custom Formatters directly into the Session itself, thereby creating a unified configuration method for all client applications including:

 

Oracle Web Determinations requires custom formatters to be configured as a Web Determinations plugin to support both output and input; refer to the topic Formatter plugin overview.

Configuration file location

Configuration for custom function handlers, inferencing listeners and formatters is done via the Oracle Determinations Engine configuration file. This can be either an xml file or a properties file, either of which can be created using a text editor such as notepad.

In order for the engine to use this file must be located in the same directory as the rulebase to which it applies and have the name <rulebase>-config.xml or <rulebase>-config.properties. For example, if the rulebase was called OPM Example Rulebase then the corresponding XML configuration file must be called OPM Example Rulebase-config.xml.

 

Note:

To have the configuration file automatically included in the compiled rulebase zip file, it should be copied into the include folder for the project.

XML contents

A rulebase configuration that configures both an inferencing listener and a custom formatter will look something like:

<configuration>
  <formatter platform="Java" library-path="basic-formatter.jar"
      class="oracle.test.TestFormatter"/>
  <inferencing-listener platform="Java" library-path="basic-inferencing-listener.jar"
   class="oracle.test.TestInferencingListener"/>
</configuration>

 

where:

configuration

the root element of the configuration file.

formatter

the name of the element which contains the formatter configuration parameters.

platform

Specifies which platform this configuration this custom component is written for. The valid values are:

library-path

Specified the location of the library which implements the custom component and its dependencies. The library path can either be absolute or relative to the location of the configuration file. Multiple libraries can be specified as a ‘;’ list and will be loaded in the order in which they are specified.

class

The class (including the package or namespace) which implements either the CustomFunctionHandler interface, the InferencingListener interface or the Formatter interface.

XML schema

The full schema for the custom function handler is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://oracle.com/determinations/engine/relational/configuration"

targetNamespace="http://oracle.com/determinations/engine/relational/configuration"
        elementFormDefault="qualified" version="10.1.0:20100301">
    <xs:simpleType name="platform">
        <xs:restriction base="xs:string">
            <xs:enumeration value="DotNet"/>
            <xs:enumeration value="Java"/>
        </xs:restriction>
    </xs:simpleType>
    <xs:complexType name="ConfigurationType">
        <xs:attribute name="platform" type="xs:string" use="required"/>
        <xs:attribute name="library-path" type="xs:string" use="required"/>
        <xs:attribute name="classpath" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:element name="configuration">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="custom-function" type="ConfigurationType" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element name="formatter" type="ConfigurationType" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element name="inferencing-listener" type="ConfigurationType" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>

 

Properties contents

A rulebase properties configuration that configures both a custom function handler and a custom formatter will look something like:

custom-function.java.library-path = TestCustomFunction.jar
custom-function.java.class = oracle.testrulebase.TestCustomFunction

formatter.java.library-path = basic-formatter.jar
formatter.java.class = oracle.test.TestFormatter

inferencing-listener.java.library-path = basic-inferencing-listener.jar
inferencing-listener.java.class = oracle.test.TestInferencingListener

 

All property names follow the pattern <object>.<platform>.<setting> where:

object

Specifies which object this configuration property is for. The valid values are:

platform

Specifies which platform this configuration this custom component is written for. The valid values are:

 setting

Specifies which setting this configuration property is for. The valid values are: